/*package dao;

import javax.servlet.http.HttpServletRequest;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

public class DaoFactory {

	protected static final String ATT_SESS_FACTORY = "sessionFactory";
	protected static final String INEXISTANT_USER = "utilisateur inexistant";
	protected static final String DUPPLICATES_USER = "utilisateur dupplique";
	protected static String SUCCESS = "success";
	protected static String ECHEC = "echec";
	

	protected Session session = null;
	protected org.hibernate.Transaction tx = null;

	public DaoFactory(HttpServletRequest request) {
		this.session = ((SessionFactory) request.getSession()
				.getServletContext().getAttribute(ATT_SESS_FACTORY))
				.openSession();
	}

	public Session getSession() {
        return session;
    }

    public org.hibernate.Transaction getTx() {
        return tx;
    }

    protected void closing() {
		session.close();
	}

	protected void rollingBack()
	{
		if (tx !=null)
			tx.rollback();
		
	}
	

}
*/